#include <func.h>

//子进程结束，父进程没结束，子进程会变为僵尸进程
int main()
{
    pid_t pid=fork();
    if(0==pid)//子进程
    {
        printf("I am child,%d ppid=%d\n",getpid(),getppid());
        return 0;
    }else{
        printf("I am parent %d\n",getpid());
        while(1);
    }
}